package com.aspire.boc.mms.gwcmp.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.aspire.boc.mms.gwcmp.dao.GwcmpProductMapper;
import com.aspire.boc.mms.gwcmp.model.GwcmpProduct;
import com.aspire.boc.mms.gwcmp.model.GwcmpProductExample;
import com.aspire.boc.mms.gwcmp.service.ProductService;
@Service
public class ProductServiceImpl implements ProductService {

	@Autowired
	private GwcmpProductMapper gwcmpProductMapper;
	
	@Override
	public List<GwcmpProduct> getProductList(Map<String, Object> param) {
		return gwcmpProductMapper.getProductList(param);
	}

	@Override
	public int countProductList(Map<String, Object> param) {
		return gwcmpProductMapper.countProductList(param);
	}

	@Override
	public int getProductIdSequence() {
		return gwcmpProductMapper.getProductIdSequence();
	}

	@Transactional
	public int insertSelective(GwcmpProduct gwcmpProduct) {	
		return gwcmpProductMapper.insertSelective(gwcmpProduct);
	}

	@Transactional
	public int updateByPrimaryKeySelective(GwcmpProduct gwcmpProduct) {
		return gwcmpProductMapper.updateByPrimaryKeySelective(gwcmpProduct);
	}

	@Override
	public GwcmpProduct selectByPrimaryKey(String id) {	
		return gwcmpProductMapper.selectByPrimaryKey(id);
	}

	@Override
	public List<GwcmpProduct> getNoOccupiedProductList(
			Map<String, Object> param) {
		
		return gwcmpProductMapper.getNoOccupiedProductList(param) ;
	}

	@Override
	public int countByExample(GwcmpProductExample example) {
		return gwcmpProductMapper.countByExample(example);
	}

	

}
